package com.example.pingze.exception;

import com.example.pingze.utils.ResultVOUtils;
import com.example.pingze.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class PingZeExceptionHandler{
    @ExceptionHandler
    public Result handler(PingZeException e){
        return ResultVOUtils.error(e.getMessage());
    }
}
